package basestudy;

public class BaseTest2 {
  public void test() {
    System.out.println("A");
  }

  public static void main(String[] args) {
    B b = new B();
    b.test();
    BaseTest2 A = (BaseTest2) b;
    b.test();
  }
}

class B extends BaseTest2 {
  public void test() {
    System.out.println("B");
  }
}